import asyncio

class ContextManager:
    def __enter__(self):
        print("Enter sync context >")

    def __exit__(self, exc_type, exc, tb):
        print("< Exit sync context")

class AsyncContextManger:
    async def __aenter__(self):
        print("Enter async context >")
        return self

    async def __aexit__(self, exc_type, exc, tb):
        print("< Exit async context")

async def use_async_context(async_ctx):
    async with async_ctx:
        print("- Use async context -")

cm = ContextManager()
with cm:
    print("- Use sync context -")
print()
acm = AsyncContextManger()
asyncio.run(use_async_context(acm))
